<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎使用TTU</title>
<style type="text/css">
<!--
#account_title {
	height: auto;
	width: auto;
	margin-top: 12px;
	margin-left: 20px;
	font-weight: 800;
	font-size: 18px;
}
#extra_title {
	font-size: 12px;
	color: #666;
	float: left;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 20px;
}
-->
</style>
<link href="css/home.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/imgareaselect-default.css" />
<script type="text/javascript" src="scripts/jquery-pack.js"></script>
<script type="text/javascript" src="scripts/jquery.imgareaselect.min.js"></script>


<script type="text/javascript">

function preview(img, selection) {
	var scaleX = 100 / selection.width;
	var scaleY = 100 / selection.height; 

	$('#thumbnail + div > img').css({
		width: Math.round(scaleX * 500) + 'px',
		height: Math.round(scaleY * 375) + 'px',
		marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
		marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
	});
	$('#x1').val(selection.x1);
	$('#y1').val(selection.y1);
	$('#x2').val(selection.x2);
	$('#y2').val(selection.y2);
	$('#w').val(selection.width);
	$('#h').val(selection.height);
}

$(document).ready(function () {
	$("#save_thumb").click(function() {
		var x1 = $("#x1").val();
		var y1 = $("#y1").val();
		var x2 = $("#x2").val();
		var y2 = $("#y2").val();
		var w = $("#w").val();
		var h = $("#h").val();
		if(x1=="" || y1=="" || x2=="" || y2=="" || w=="" || h==""){
			alert("You must make a selection first");
			return false;
		}else{
			return true;
		}
	});
});

$(window).load(function () {
	$("#thumbnail").imgAreaSelect({ aspectRatio: "1:1", onSelectChange: preview });
});

</script>




</head>
<body>
<?php
include_once 'msg_redirect.php'; 
if($_COOKIE['TTU'] != "logined"){
	msg_redirect("您还未登录哦！", "index.php");
}?>
<div id="container">
<div id="header">
	<div id="logo"><img src="image/logo2.jpg" width="220" height="30" /></div>
	<div id="nav_area">
	  <a  class="not_current_nav" href="home.php">我的首页</a>
      <a  class="current_nav" href="my_account">我的账号</a>
      <a  class="not_current_nav" href="logout.php">退出</a>
      <a  class="not_current_nav" href="people_search.php">找人</a>
      <form action="weibo_search_result.php" method="post" name="find_form">
        <input id="find"name="keyword" type="text" value="搜微博" />
        <input id="search_button"name="search_submit" type="image" src="image/search.jpg" />
        <input name="search" type="hidden" value="search"/>
      </form>
  </div>
</div>
    
<div id="left">
<ul id="nav3">
  <li ><a class="current_page">账号修改</a></li>
  <li><a href="my_account.php" class="not_current">个人资料</a></li>
  <li><a href="" class="current_do">头像上传</a></li>
  <li><a href="my_account_password.php" class="not_current">修改密码</a></li>
  </ul><hr class="line"/>
</div>
  <div id="primary">
    <div id="account_title">上传头像</div>
    <div id="extra_title">大胆地秀出你自己吧，这样可以交到更多朋友哦！</div>
		
		<img src="upload_pic/resized_pic.jpg" style="float: left; margin-right: 10px;" id="thumbnail" alt="Create Thumbnail" />
			<div style="float:left; position:relative; overflow:hidden; width:100px; height:100px;">
				<img src="upload_pic/resized_pic.jpg" style="position: relative;" alt="Thumbnail Preview" />
			</div>

			<br style="clear:both;"/>
			<form name="thumbnail" action="image_upload_crop.php" method="post">
				<input type="hidden" name="x1" value="" id="x1" />
				<input type="hidden" name="y1" value="" id="y1" />
				<input type="hidden" name="x2" value="" id="x2" />
				<input type="hidden" name="y2" value="" id="y2" />
				<input type="hidden" name="w" value="" id="w" />
				<input type="hidden" name="h" value="" id="h" />
				<input type="submit" class="button" name="upload_thumbnail" value="Save Thumbnail" id="save_thumb" />
			</form>	
		
		<form name="photo" enctype="multipart/form-data" action="image_upload_crop.php" method="post">
		Photo <input type="file" name="image" size="30" /> <input type="submit" name="upload" value="Upload" class="button" />

	</form>

		
  </div>
<div id="right">
	<div class="right_title">
    <h4>你可能认识的人</h4></div>
		<ul id="people_mayknow">
	  	  <li><div class="small_photo"></div><div class="people_info"></div></li>
		  <li><div class="small_photo"></div><div class="people_info"></div></li>
			<li><div class="small_photo"></div><div class="people_info"></div></li>
	</ul>
	<div class="more"><a href="#">更多&gt;&gt;</a></div>
	<hr class="line3"/>
	<div class="right_title"><h4>社团活动</h4></div>
<ul class="group_activity">
        	<li><a href="#">吉他社嘉年华11月10号学生活动中心与你有约</a></li>
            <li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
	</ul>
    <div class="more"><a href="#">更多&gt;&gt;</a></div>    
    <hr class="line3" />
    <div class="right_title"><h4>公文通</h4></div>
    	<ul class="group_activity">
        	<li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
            <li><a href="#">..........</a></li>
    	</ul>
    <div class="more"><a href="#">更多&gt;&gt;</a></div>    
    <hr class="line3" />
</div>
  <div id="footer">深圳大学计算机系IBM项目网站&nbsp;版权所有<br />
  mobile: 633721&nbsp;&nbsp;E-mail: chen_zx_happy@163.com</div></div>
</body>
</html>